#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

 int Fun(int num)
{
	int sum = 0;
	if (num > 0)
	{
		sum = num * Fun(num - 1);
		return sum;
	}
}

int main()
{
	int num = 0;
	scanf("%d", &num);
	int sum = Fun(num);
	printf("%d", sum);
	return 0;
}